package date;

import java.text.SimpleDateFormat;
import java.util.Date;
 
/**
 * 获得当前日期
 * @author yy
 *
 */

public class DateDemo1 {
	public static void main(String[] args) {
		Date date = new Date();
		System.out.println(date);
		
		SimpleDateFormat formater = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		String now = formater.format(date);
		System.out.println(now);
	}

}
